<?php
class News extends AppModel {

	var $validate = array(
		'id' => array('numeric'),
		'title' => array('alphanumeric'),
// 		'introduction' => array('alphanumeric'),
		'keywords' => array('alphanumeric'),
		//'body' => array('alphanumeric'),
		//'image' => array('alphanumeric'),
		'user_id' => array('numeric')
	);
    
    var $actsAs = array('MeioUpload' => array(
                        'image' => array(
                        'dir' => 'files',
                        'create_directory' => false,
                        'allowed_mime' => array('image/jpeg', 'image/jpeg', 'image/gif', 'image/png'),
                        'allowed_ext' => array('.jpg', '.jpeg', '.png', '.gif'),
                        'thumbsizes' => array(
                                'small'  => array('width'=>100, 'height'=>100),
                                'medium' => array('width'=>220, 'height'=>220),
                                'large'  => array('width'=>800, 'height'=>600))
                         ))
                       );
    
	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
			'User' => array('className' => 'User',
								'foreignKey' => 'user_id',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			)
	);

}
?>